<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <script src="../js/vue.js"></script>
</head>
<body>
    <div id="app">
        <input type="checkbox" v-model="love" value="篮球">篮球<br>
        <input type="checkbox" v-model="love" value="足球">足球<br>
        <input type="checkbox" v-model="love" value="橄榄球">橄榄球<br>
        <input type="checkbox" v-model="love" value="排球">排球<br>
        <input type="checkbox" v-model="love" value="乒乓球">乒乓球<br>
        <input type="checkbox" v-model="love" value="羽毛球">羽毛球<br>
        <button @click="handleClick">获取数据</button>
    </div>
    <script>
        var vm = new Vue({
            el:"#app",
            data:{
                love:[]
            },
            methods:{
                handleClick(){
                    console.log(this.love);
                }
            }
        });
    </script>
</body>
</html>